/*
 * ToolType.java
 *
 * Created on 9 maj 2007, 18:46
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pl.krakow.ae.knp.wikiboard.gui.tools;

import java.awt.Cursor;

/**
 *
 * @author m
 */
public enum ToolType
{
    SELECTOR, RUBBER, RESIZER, ROTATOR, FILL_MARKER, TEXT_MARKER, 
    LINE_MARKER, STRAIGHTLINE_MARKER, ELLIPSE_MARKER, RECT_MARKER;
    
    /** @return a Cursor appriopriate for the current ToolType */
    public Cursor getCursor()
    { 
        Cursor cursor = null;
        switch(this)
        {
            case RUBBER:
            case SELECTOR:
                cursor = new Cursor(Cursor.HAND_CURSOR);
                break;
            
            case FILL_MARKER:
            case TEXT_MARKER:
            case LINE_MARKER:
            case STRAIGHTLINE_MARKER:
            case ELLIPSE_MARKER:
            case RECT_MARKER:
                cursor = new Cursor(Cursor.CROSSHAIR_CURSOR);
                break;
            
            case RESIZER:
                cursor = new Cursor(Cursor.MOVE_CURSOR);
                break;
                
            default:
                cursor = new Cursor(Cursor.CROSSHAIR_CURSOR);
        }
        return cursor;
    }
    
};
